package com.yanggu.scala.chapater10

import scala.collection.mutable.ArrayBuffer

object ArrayBuffer2JavaList {

  def main(args: Array[String]): Unit = {
    //Scala和Java的List互相转换
    val arr = ArrayBuffer[Int](1, 2, 3)
    //导入隐式转换函数, 将scala的ArrayBuffer => Java的List
    import scala.collection.JavaConverters.bufferAsJavaListConverter
    val java = arr.asJava
    println(java.getClass)
    println(java.toString)


  }

}
